﻿package com.fox2d 
{
	
	/**
	 * ...
	 * @author Orlando Leite
	 */
	public class Camera2D 
	{
		protected var _x:Number = 10;
		protected var _y:Number = 10;
		protected var _width:Number = 100;
		protected var _height:Number = 100;
		protected var _zoom:Number = 1;
		
		private var func:Function;
		
		public function Camera2D( func:Function ) 
		{
			this.func = func;
		}
		
		public function get x():Number
		{
			return _x;
		}
		
		public function get y():Number
		{
			return _y;
		}
		
		public function get width():Number
		{
			return _width;
		}
		
		public function get height():Number
		{
			return _height;
		}
		
		public function get zoom():Number
		{
			return _zoom;
		}
		
		public function set x( value:Number ):void
		{
			_x = value;
			func.call();
		}
		
		public function set y( value:Number ):void
		{
			_y = value;
			func.call();
		}
		
		public function set width( value:Number ):void
		{
			_width = value;
			func.call();
		}
		
		public function set height( value:Number ):void
		{
			_height = value;
			func.call();
		}
		
		public function set zoom( value:Number ):void
		{
			_zoom = value;
			func.call();
		}
	}
	
}